# Use an official Python runtime as a parent image
FROM astral/uv:python3.13-trixie-slim

# Set the working directory in the container
WORKDIR /app

# Copy the dependency files
COPY pyproject.toml uv.lock ./

# Install dependencies using uv
RUN uv sync

# Copy the rest of the application code
COPY . .

# Make port 50051 available to the world outside this container
EXPOSE 50051

# Run the application
CMD ["uv", "run", "rag_agent_server.py"]
